<template>
    <div class="public-common">
        <el-row>
            <el-col :span="17">
                <!--车辆服务设施-->
                <div class="public-title">车辆服务设施列表</div>
                <div style="padding:10px;">
                    <el-row>
                        <el-col :span="6">
                            <el-input placeholder="请输入内容" v-model="form.test" class="input-with-select"/>
                                
                        </el-col>
                        <el-col :span="18">
                            <el-button type="primary" icon="el-icon-search" style="margin-left:10px;">搜索</el-button>
                            <el-button type="success" icon="el-icon-edit-outline">新建</el-button>
                            <el-button type="danger" icon="el-icon-delete">删除</el-button>
                        </el-col>
                    </el-row>
                </div>
        
                <el-table :data="tabledata" size="mini" border stripe header-row-class-name="textcenter">
                    <el-table-column
                    type="selection"
                    width="55" fixed="left">
                    </el-table-column>
                    <el-table-column
                        label="车牌号" >
                        <template slot-scope="scope">
                            {{scope.row.companyName}}
                        </template>
                    </el-table-column>
                    <el-table-column
                        label="车型">
                        <template slot-scope="scope">
                            {{scope.row.carId}}
                        </template>
                    </el-table-column>                
                    <el-table-column
                        label="发动机号">
                        <template slot-scope="scope">
                            {{scope.row.carType}}
                        </template>
                    </el-table-column>
                    <el-table-column
                        label="车架号" >
                        <template slot-scope="scope">
                            {{scope.row.companyName}}
                        </template>
                    </el-table-column>
                    <el-table-column
                        label="行驶证登记日期">
                        <template slot-scope="scope">
                            {{scope.row.carId}}
                        </template>
                    </el-table-column>                
                    <el-table-column
                        label="承包人">
                        <template slot-scope="scope">
                            {{scope.row.carType}}
                        </template>
                    </el-table-column>
                    <el-table-column
                        label="车队" >
                        <template slot-scope="scope">
                            {{scope.row.companyName}}
                        </template>
                    </el-table-column>
                    <el-table-column
                        label="经营权证">
                        <template slot-scope="scope">
                            {{scope.row.carId}}
                        </template>
                    </el-table-column>                
                    <el-table-column
                        label="操作" fixed="right">
                        <template slot-scope="scope">
                            <el-button type="danger" icon="el-icon-delete" size="mini">删除</el-button>
                        </template>
                    </el-table-column>
                         	
                </el-table>
                <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="page.now"
                :page-sizes="page.sizes"
                :page-size="page.pagesize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="page.total" style="margin-top:10px;">
                </el-pagination>
            </el-col>
            <el-col :span="7">
                <div style="padding-left:10px;">
                    <div class="public-title">服务设施信息列表</div>
                    <el-table :data="detaildata" size="mini" border stripe header-row-class-name="textcenter">
                        <el-table-column
                            label="设施编号" >
                            <template slot-scope="scope">
                                {{scope.row.companyName}}
                            </template>
                        </el-table-column>
                        <el-table-column
                            label="设施名称">
                            <template slot-scope="scope">
                                {{scope.row.carId}}
                            </template>
                        </el-table-column>                
                        <el-table-column
                            label="数据值">
                            <template slot-scope="scope">
                                {{scope.row.carType}}
                            </template>
                        </el-table-column>        	
                    </el-table>
                </div>
                
            </el-col>
        </el-row>
        <!--dialog-->
        <el-dialog title="车辆服务设施"  :visible.sync="dialog.isVisible">
            <el-form label-width="120px">
                <el-form-item label="车牌号">
                    <el-select v-model="dialog.carid" placeholder="请选择">
                        <el-option
                        v-for="item in select.carids"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="设施列表">
                    <el-table :data="dialog.data" size="mini" border stripe header-row-class-name="textcenter" max-height="230">
                        <el-table-column
                        type="selection"
                        width="55">
                        </el-table-column>
                        <el-table-column
                            label="设施名称">
                            <template slot-scope="scope">
                                {{scope.row.name}}
                            </template>
                        </el-table-column>          	
                    </el-table>
                </el-form-item>    
                <el-form-item label="">
                    <el-button type="primary">确定</el-button>  
                    <el-button type="info" @click="dialog.isVisible = false">返回</el-button>  
                </el-form-item>
                          
            </el-form>

        </el-dialog>
    </div>
</template>
<script>
export default {
    data(){
        return {
            form:{
                test:'',
                carid:''
            },
            tabledata:[
                {carId:1}
            ],
            page:{
              now:1,
              pagesize:10,
              sizes:[2,10, 20, 50, 100],
              total:0,
              key:''
            },
            detaildata:[],
            dialog:{
                isVisible:false,
                carid:'',
                data:[
                    {name:"公司标示",value:'',id:'100'},
                    {name:"监督卡座",value:'',id:'101'},
                    {name:"计价器IC卡",value:'',id:'102'},
                    {name:"座套",value:'',id:'103'},
                    {name:"公交分局防伪标识",value:'',id:'104'},
                    {name:"防劫网",value:'',id:'105'},
                    {name:"车载显示屏",value:'',id:'106'},
                    {name:"GPS编号",value:'',id:'107'},
                    {name:"GPS使用频率",value:'',id:'108'},
                    {name:"计价器编号",value:'',id:'109'},
                    {name:"计价器类型",value:'',id:'110'},
                    {name:"钢瓶编号",value:'',id:'111'},
                    {name:"钢瓶型号",value:'',id:'112'},
                    {name:"钢瓶容量",value:'',id:'113'},
                    {name:"钢瓶审验日期",value:'',id:'114'},
                    {name:"钢瓶生产厂家",value:'',id:'115'},
                    {name:"燃气系统名称",value:'',id:'116'},
                    {name:"顶灯类型",value:'',id:'117'},
                    {name:"电子标签识别号",value:'',id:'118'},
                    {name:"环保标识(绿标、黄标)",value:'',id:'119'},
                    {name:"三角警示牌",value:'',id:'120'},
                    {name:"灭火器是否车载",value:'',id:'121'},
                    {name:"灭火器有效期",value:'',id:'122'},
                    {name:"车辆年检日期",value:'',id:'123'},
                    {name:"安全气囊",value:'',id:'124'}
                ]
            },
            select:{
                carids:[]
            }
        }
    },
    mounted(){
        
    },
    methods:{
        search(){
            alert("search")
        },
        //分页
        handleSizeChange(pagesize){
            this.page.pagesize = pagesize;
            this.search(true,true);
        },
        handleCurrentChange(pageno){
            this.page.now = pageno;
            this.search(true,true);
        }

    }
}
</script>
<style lang="scss">
$Color:#15428F;
$Bgnavtab:rgba(255,255,255,.5);
$BgHeader:#DFE8F6;
$BorderColor:#99bbe8;
.public-common{
    padding: 20px;
    .public-title{line-height: 30px;background-color: #deecfd;padding:0 10px;color:$Color; }
}
</style>